1. Field of the Invention
The present invention relates generally to a computer implemented method, data processing system, and computer program product for efficient use of volatile or physical memory. More specifically, the present invention relates to bringing into physical memory, or preventing the transferring from physical memory, the residency of a virtual memory page ahead of a flush operation.
2. Description of the Related Art
Designers of modern computers rely on two or more classes of workspace or addressing space (memory or storage). A first class of workspace is fast but relatively expensive. A second class of workspace is relatively slow, but cheaper than the first class of workspace. The first class of workspace can be volatile memory such as random access memory (RAM), while the second class of workspace can be a block storage device such as a disk drive. Frequently, there may be ten or more times as much of the second class of workspace available as compared to the first class in a typical computer system.
In order to operate efficiently, a system, as described above, moves instructions and data from the second class of workspace to the first class of workspace before a system processor operates on such instructions or data. A scheme to address memory within both classes of workspace is called virtual memory. Such an addressing scheme provides for a range of addresses larger than the addressable physical memory. Accordingly, a virtual memory ‘page’ can be actually stored to either physical memory or to storage, which correspond to the first class of workspace and the second class of workspace, respectively. Nevertheless, such virtual memory pages, if in the second class of workspace, must be marked as such, within a table, and then transferred to physical memory when accessed by the processor. The handling and manipulating of a virtual memory pages, a computer resource, is done through a virtual memory manager sub-component to a hypervisor. A hypervisor assigns resources to logical partitions.
Transferring data between storage and physical memory can be an expensive operation since the transfer is protracted, as compared to moving data between physical memories. Accordingly, benefits may be achieved if such transfers are minimized.
A virtual memory page is a fixed-size block of data. A virtual memory page can be resident in memory. Such a virtual memory page is mapped to a location where the physical data is stored in physical memory. Otherwise, a virtual memory page can be resident on a disk or other block device. In other words, the virtual memory page is paged out of physical memory, and instead, placed into paging space or a file system.
Accordingly, a virtual memory page can be an abstraction of memory storage that decouples the physical media from the operating characteristics of the virtual memory page as used within an operating system (OS). Such physical media is where the virtual memory page resides. The physical media is any storage mechanism, for example, random access memory, disk storage, tape storage, and flash memory, among others.